package licode.unisop.auth.exception;

import licode.unisop.types.AuthConst;
import licode.unisop.unilite.result.UniResultCode;

/**
 * 定义平台模块的错误码
 * 认证模块的错误码开头为811
 *
 * @author WR
 */
public class AuthErrorCode {
    public static UniResultCode ILLEGAL_PLATFORM = new UniResultCode(811001, "非法的平台！");
    public static UniResultCode PLATFORM_NOT_EXISTED = new UniResultCode(811002, "平台不存在！");
    public static UniResultCode PLATFORM_NOT_AUTH = new UniResultCode(811003, "平台未认证！");
    public static UniResultCode USER_LACK_OF_CLIENT_INFO = new UniResultCode(811004, "缺失客户端信息！");
    public static UniResultCode USER_NOT_SUPPORT_AUTH = new UniResultCode(811005, "不支持认证方式！");
    public static UniResultCode AUTH_CODE_HAS_EXPIRED = new UniResultCode(811006, "无效授权码！");
    public static UniResultCode INVALID_TICKET_URL = new UniResultCode(811007, "无效重定向地址！");
    public static UniResultCode PLATFORM_WRONG_STATE = new UniResultCode(811008, "平台状态错误！");
    public static UniResultCode PLATFORM_NO_GRANT_REALM = new UniResultCode(811009, "平台无权操作领域！");

    public static UniResultCode CLIENT_ID_EXIST = new UniResultCode(811300, "客户端已存在！");
    public static UniResultCode CLIENT_ID_NOT_EXIST = new UniResultCode(811301, "客户端不存在！");
    public static UniResultCode CLIENT_SECRET_WRONG = new UniResultCode(811302, "客户端秘钥错误！");
    public static UniResultCode CLIENT_INFO_NO_EXIST = new UniResultCode(811303, "客户端信息不能为空！");

    public static UniResultCode USER_NOT_EXIST = new UniResultCode(811400, "用户不存在");
    public static UniResultCode USER_CHECK_CREDENTIAL_FAIL = new UniResultCode(811401, "账号或密码不正确，请重新输入");
    public static UniResultCode USER_INVALID_ACCOUNT = new UniResultCode(811402, "无效用户账号！");
    public static UniResultCode USER_INVALID_AUTH = new UniResultCode(811403, "无效认证信息！");
    public static UniResultCode ACCESS_TOKEN_EXPIRED = new UniResultCode(AuthConst.USER_NOT_LOGIN, "登录已失效！");
    public static UniResultCode INVALID_ACCESS_TOKEN = new UniResultCode(811405, "无效访问令牌！");
    public static UniResultCode INVALID_REFRESH_TOKEN = new UniResultCode(811406, "无效刷新令牌！");
    public static UniResultCode BUILD_AUTH_INFO_FAILED = new UniResultCode(811407, "生成认证信息失败！");
    public static UniResultCode USER_IS_NOT_LOGIN = new UniResultCode(811408, "用户未登录！");
    public static UniResultCode USER_WRONG_STATE = new UniResultCode(811409, "用户状态错误！");
    public static UniResultCode USER_NO_GRANT = new UniResultCode(811410, "无访问权限！");
    public static UniResultCode USER_GREAT_MAX_LOGIN_COUNT = new UniResultCode(811411, "已超出最大登录！");
}
